<div class="slide-dialog-header">
	<div class="slide-dialog-title">
		<h2>{{title}}</h2>
		<div class="slide-dialog-tools">
			<span class="button" ng-class="{'active': data.useSql}" ng-click="data.useSql=!data.useSql"><i class="fa fa-toggle-on"></i> 自定义sql</span>
		</div>
	</div>
	<div class="slide-dialog-toolbar">
		<ul>
			<li><span class="ui-btn slide-dialog-close" ng-click="close(false)"><i class="fa fa-remove"></i></span></li>
		</ul>
	</div>
</div>
<div class="slide-dialog-body x-slide-dialog-body">
	<form name="form" novalidate="novalidate" ng-submit="submit(form.$valid);">
		<div class="x-data-panel-fixed">
			<div class="x-data-panel-body">
				<!-- <div class="x-toolbar">
					<h3>请至少选择一张表</h3>
				</div> -->
				<div class="ui-grid ui-grid-mini x-grid-fixed x-grid-no-footer" ng-if="!data.useSql" grid-view="gridOptions" grid-selection></div>
				<div class="data-form" ng-if="data.useSql">
					<table cellspacing="0" cellpadding="0">
						<colgroup>
							<col width="72" />
						</colgroup>
						<tbody>
							<tr>
								<td>SQL：</td>
								<td>
									<textarea name="sql" ng-model="data.sql" class="x-ipt" rows="8" required></textarea>
									<div class="x-error" ng-if="interacted(form.sql)" ng-messages="form.sql.$error"><span ng-message="required">请输入sql语句</span></div>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			<div class="x-data-panel-footer">
				<button class="fl dialog-button cancel-button" type="button" ng-click="prev()">上一步</button><!-- <button class="dialog-button cancel-button" type="button" ng-click="close(false)">取消</button> --><button type="submit" class="dialog-button" ng-disabled="formDisabled"><span class="btn-text">下一步</span></button>
			</div>
		</div>
	</form>
</div>